package com.mysoft.gfyx.marketdevelop.controller;

import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.controller.dto.*;
import com.mysoft.gfyx.marketdevelop.mip.dto.GetInvestmentRequestDto;
import com.mysoft.gfyx.marketdevelop.mip.dto.SearchDeveloperRequestDto;
import com.mysoft.gfyx.marketdevelop.remoteService.dto.AddCustomersRequestDto;
import com.mysoft.gfyx.marketdevelop.service.DeveloperService;
import com.mysoft.gfyx.marketdevelop.service.DeveloperTakeLandService;
import com.mysoft.gfyx.marketdevelop.service.dto.AdFieldOptionResponseDto;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;
import java.util.List;

@PubService(value = "/landDataApi", prefix = RequestPrefix.API)
@Tag(name = "拿地数据-API")
public class TakeLandDataApiController {

    @Autowired
    private DeveloperService developerService;

    @Autowired
    private DeveloperTakeLandService developerTakeLandService;

    @PubAction(value = "/detail", method = RequestMethod.POST)
    public Object landDetail(@RequestBody GetDetailDataRequestDto dto) {
        return developerTakeLandService.getLandDetail(dto);
    }

    @PubAction(value = "/getOptions", method = RequestMethod.POST)
    public List<AdFieldOptionResponseDto> getOptions() {
        return developerTakeLandService.getOptions();
    }
}
